import React from 'react';
export default class RefDemo extends React.Component{
  constructor(){
    super();
    this.state = {

    }
    this.RefDom = React.createRef();
  }
  componentDidMount() {
    console.log(this.RefDom.current)
  }
  render () {
    return(
      <div ref={ this.RefDom }>
        Ref组件
      </div>
    )
  }
}